﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OOAD_Project_Engine.Foundation.Interfaces;

namespace OOAD_Project_Engine.Domain.Entities
{
    internal sealed class EnabledState
    {
        Dictionary<IEntityComponent, bool> state = new Dictionary<IEntityComponent, bool>(); // component, enabled

        public EnabledState(IEnumerable<IEntityComponent> components)
        {
            foreach (IEntityComponent component in components)
            {
                state.Add(component, component.Enabled);
            }
        }

        public bool this[IEntityComponent component]
        {
            get
            {
                return state[component];
            }
        }
    }
}
